package com.winchain.chainbill.home.controller;

import com.shell.bee.base.annotation.Logging;
import com.winchain.chainbill.home.service.HomeService;
import com.winchain.chainbill.home.vo.BillIncomeSpendParamVo;
import com.winchain.chainbill.home.vo.TxCountParamVo;
import com.winchain.chainbill.home.vo.TxCountResultVo;
import java.text.ParseException;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HomeController {
	@Autowired
	HomeService homeService;

	@RequestMapping
	@ResponseBody
	@Logging(module = "��������", methods = "������")
	public Map<String, Object> getStats() {
		return this.homeService.getStats();
	}

	@RequestMapping
	@ResponseBody
	@Logging(module = "��������", methods = "��������")
	public Map<String, Object> queryBillIncomeSpendTotal(BillIncomeSpendParamVo billIncomeSpendParamVo) {
		return this.homeService.queryBillIncomeSpendTotal(billIncomeSpendParamVo);
	}

	@RequestMapping
	@ResponseBody
	@Logging(module = "��������", methods = "����/����/����/����")
	public TxCountResultVo queryTxCountInfo(TxCountParamVo txCountParamVo) throws ParseException {
		return this.homeService.queryTxCountInfo(txCountParamVo);
	}
}
